package com.ruoyi.my.controller;

import com.ruoyi.approval.domain.SysSimApproval;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.my.controller.dto.MyCardReq;
import com.ruoyi.receive.domain.SimReceive;
import com.ruoyi.receive.service.ISimReceiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping
public class MyCardController {

    @Autowired
    private ISimReceiveService simReceiveService;

    @PostMapping(value ="/my/card")
    public AjaxResult waitReceiveCard(@RequestBody MyCardReq myCardReq){
        //待领用的
        SimReceive simReceive = new SimReceive();
        simReceive.setReceiveUser(myCardReq.getApplyUser());
        simReceive.setReceiveStatus(0L);
        simReceiveService.selectSimReceiveList(simReceive);
        List<SimReceive> data = simReceiveService.selectSimReceiveList(simReceive);
        //已领用的,


        return AjaxResult.success(data);
    }
}
